package cn.itcast.nems.studentrecord.dto.refund;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class JournalRefundRollbackDTO implements Serializable {
    /**
     * 主键ID;前缀+6位随机字符（大写字母+数字），示例：TF-I2Z8D8
     */
    private String id;

    /**
     * 退费凭单ID
     */
    private String journalRefundId;

    /**
     * 学籍ID;需要退费的学籍
     */
    private String studentRecordId;

    /**
     * 退回时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime rollbackDatetime;

    /**
     * 流水号
     */
    private String bizNo;

    /**
     * POS单号
     */
    private String posNo;

    /**
     * 本次退费金额
     */
    private BigDecimal amount;

    /**
     * 摘要
     */
    private String summary;
    /**
     * 校区 code
     */
    private String campusId ;
    /**
     * 校区 name
     */
    private String campusName ;

    /**
     * 退费渠道CODE
     */
    private String paymentAccountCode;

    /**
     * 退费渠道名称
     */
    private String paymentAccountName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createdDatetime;

    /**
     * 创建人
     */
    private String createdBy;
}
